# ==================================
#
#  Code for replicating:
# "Positioning Under Alternative Electoral Systems: Evidence From Japanese Candidate Election Manifestos"
#  Amy Catalinac, NYU
#
# ==================================



# ==================================
# Discussion of alternative explanations
# Appendix, p. 22

# Read in topics described and validated in:
# Catalinac, Amy.  Electoral Reform and National Security in Japan: From Pork to Foreign Policy,
# Cambridge University Press, 2016, pp 87-95.

load("topics_in_manifestos.Rdata") # saved as id2

# Manifestos in 1993:  
id.93 <- id2[id2$year==1993,]

# Proportion of discussion devoted to:
# pork:
mean(id.93$priv)

# national security (V6)
tops.93 <- colMeans(id.93[,6:74])
tops.93[6]

# global economy(V69)
tops.93[69]

# political reform (V2, V5, V14, V15, V16, V17, V19, V21, V22, V41, V49, V53, V59, V68)
sum(tops.93[c(2, 5, 14, 15, 16, 17, 19, 21, 22, 41, 49, 53, 59, 68)])

# Manifestos in 1996:  
id.96 <- id2[id2$year==1996,]

# Proportion of discussion devoted to:
# pork:
mean(id.96$priv)

# national security (V6)
tops.96 <- colMeans(id.96[,6:74])
tops.96[6]

# global economy(V69)
tops.96[69]

# political reform (V2, V5, V14, V15, V16, V17, V19, V21, V22, V41, V49, V53, V59, V68)
sum(tops.96[c(2, 5, 14, 15, 16, 17, 19, 21, 22, 41, 49, 53, 59, 68)])

rm(list=ls())

